Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

How to read an extra netcdf file in mpi way

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

mirabelle

Member
Hi

I want to add some new variable in the WRF, and use it at solve.F .

How to read an extra netcdf file variable in the initial step, and then broadcast the variable into calculate core ?

Could you give me an example, or tell me which subroutine to reference?
 
Thank you.

I have known how to add a variable through modifying Registry.EM_COMMON

And this post (https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=44&t=10715) told us how to use sst and update sst in this codes: phys/module_surface_driver.F.
But I wanna know how to read in sst from NC file at beginning.

I have tried to read nc file by dyn_em/module_wps_io_arw.F/SUBROUTINE read_wps, but there is some Error:

problem in inventory_wrf_binary_file, beginning and ending rec len words unequal
begining reclen = 38159427
ending reclen = 514148308
irecs = 1
nrecs = 1
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE: <stdin> LINE: 447
curious reclen discrepancy
 
Hi,
If you have SST files that are in netCDF format, you can do this in the WPS process. You can convert the files from netCDF format to the intermediate file format, and then use them, along with your other input data files to run metgrid. This will ensure that they are fed into the model. Take a look at this post that provides some example scripts for doing this conversion.

You can then follow the procedures in our Online Tutorial to use the files to run metgrid.
 
Top