Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

output_vars_mask #60

Open
chelosilvera98 opened this issue Feb 10, 2025 · 2 comments
Open

output_vars_mask #60

chelosilvera98 opened this issue Feb 10, 2025 · 2 comments

Comments

@chelosilvera98
Copy link

I don't find any example besides the README.namelist, where there's an actual variable selection.
In the example it uses every variable:
enable_atm_vars = 79*.true., ! Mask to eventually disable variables ATM
enable_srf_vars = 65*.true., ! Mask to eventually disable variables SRF
enable_rad_vars = 31*.true., ! Mask to eventually disable variables RAD
enable_sub_vars = 19*.true., ! Mask to eventually disable variables SUB
enable_sts_vars = 29*.true., ! Mask to eventually disable variables STS
enable_shf_vars = 10*.true., ! Mask to eventually disable variables SHF
enable_lak_vars = 19*.true., ! Mask to eventually disable variables LAK
enable_opt_vars = 24*.true., ! Mask to eventually disable variables OPT
enable_che_vars = 31*.true., ! Mask to eventually disable variables CHE

I want to know how can i select the ones i want.
Besides, using ncdump -h on any of my output files, the number of variables is different from the README.namelist example.

Thanks.

@graziano-giuliani
Copy link
Collaborator

I agree is purely "cryptic".... You have to look into the code itself to get an idea.
The "enable_KND_vars" is an array of logical, and the variables are inserted in it in the order: 2d,3d,4d.
If you look in the file Main/mpplib/mod_ncout.F90, you find the list of the variables themselves.
For an example, I will look at STS file, in the git code:
` integer(ik4) , parameter :: sts_xlon = 1
integer(ik4) , parameter :: sts_xlat = 2
integer(ik4) , parameter :: sts_mask = 3
integer(ik4) , parameter :: sts_topo = 4
integer(ik4) , parameter :: sts_area = 5
integer(ik4) , parameter :: sts_ps = 6
integer(ik4) , parameter :: sts_tgmax = 7
integer(ik4) , parameter :: sts_tgmin = 8
integer(ik4) , parameter :: sts_pcpmax = 9
integer(ik4) , parameter :: sts_pcpavg = 10
integer(ik4) , parameter :: sts_sund = 11
integer(ik4) , parameter :: sts_psmin = 12
integer(ik4) , parameter :: sts_psavg = 13
integer(ik4) , parameter :: sts_srunoff = 14
integer(ik4) , parameter :: sts_trunoff = 15
integer(ik4) , parameter :: sts_wsgsmax = 16

integer(ik4) , parameter :: sts_t2max = 1
integer(ik4) , parameter :: sts_t2min = 2
integer(ik4) , parameter :: sts_t2avg = 3
integer(ik4) , parameter :: sts_w10max = 4`
The first set are the 2D variables, the second set are the 3D. In the enable_STS_vars, the true/false will be indexed in the above order: first the 2D, then the 3D. Note that you cannot disable coordinate variables (lon,lat,mask,topo,area,ps). As an example the below will enable only pcp_avg:
'[9*.false.,.true.,10*.false.]'
If you look in the Main/mpplib/mod_ncout.F90 you will find the variables for all the other file types. Note also in the latest code the 'ifcordex' flag that performs a selection.

@chelosilvera98
Copy link
Author

Hi, thank you for taking a time to answer.

Just to be sure, in the example you mentioned to enable only pcp_avg you set the first 9 in false, but then said that coordinate variables can't be disabled, so should i assume it overwrites them with true?

Another doubt i have is that the README.namelist puts for example in enable_srf_vars = 65* but in mod_ncout.F90 i count in total 48 srf variables.
I tried filling the 48 how i wanted, and filling 65 too, but i still got error.
In my case i want from srf ua100m (3d:8) and va100m (3d:9) so i put this line on namelist:

enable_srf_vars = 46*.false., 2*.true. (counting 48) and this is my error:
Execution terminated because of runtime error
In File mod_ncstream.F90 at line: 1703
Abort called by computing node 31 at 2025-02-11 12:14:57.323 -0300

enable_srf_vars = 46*.false., 2*.true., 17*.false* (counting 65) and this is my error:
-------------- FATAL CALLED ---------------
Fatal in file: mod_params.F90 at line: 2689
Error reading OUTPARAM

mod_params.F90 : 2689: 1
Abort called by computing node 0 at 2025-02-11 12:18:01.162 -0300
Execution terminated because of runtime error

I don't know if it's the array size, or the syntax, or what.

Appreciate any help on the matter. Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants